package com.administration.dao;

import java.util.List;

import com.administration.entity.Access;
import com.administration.entity.Category;
import com.administration.entity.Groups;
import com.administration.entity.GroupPrivilege;
import com.administration.entity.Privilege;
import com.administration.entity.User;
import com.administration.entity.resultsetmapping.PrivilegeMapping;
import com.core.dao.BaseDAO;

public interface AdministrationDao extends BaseDAO{
	public Long addAccess(Access access) throws Exception;

	public void updateAccess(Access access) throws Exception;

	public List<Access> getAllAccess() throws Exception;

	// -------------------------------------------//
	public Long addPrivilege(Privilege privilage) throws Exception;

	public void updatePrivilege(Privilege privilage) throws Exception;

	public void delatePrivilege(Privilege privilage) throws Exception;

	public List<Privilege> getAllPrivileges() throws Exception;

	// -------------------------------------------//
	public Long addGroupPrivileges(GroupPrivilege groupPrivilages)
			throws Exception;

	public void updateGroupPrivileges(GroupPrivilege groupPrivilages)
			throws Exception;

	public void deleteAllGroupPrivilegesOfGroup(Long groupId)
			throws Exception;

//	public Boolean isGroupPrivilagesFound(GroupPrivilege groupPrivilege) throws Exception;

	public List<GroupPrivilege> getAllGroupPrivileges(Long groupRecId)
			throws Exception;

	public void delateAccess(Access access) throws Exception;

	public void delateGroupPrivileges(GroupPrivilege groupPrivilages)
			throws Exception;

	public Long addGroup(Groups group) throws Exception;

	public Groups getGroupById(Long groupId) throws Exception;

	public List<Groups> getAllGroups() throws Exception;

	public void deleteGroup(Groups group) throws Exception;

	public void updateGroup(Groups group) throws Exception;

	// ----------------------------------------------------------//
	// -------------------------Category-------------------------//
	// ----------------------------------------------------------//
	public Category getCategoryById(Long categoryid) throws Exception;

	public List<Category> getAllCategories() throws Exception;

	// ----------------------------------------------------------//
	// ---------------------------User---------------------------//
	// ----------------------------------------------------------//
	public User getUserById(Long userId) throws Exception;

	public List<User> getAllUsers() throws Exception;

	public Long addUser(User user) throws Exception;

	public void deleteUser(User user) throws Exception;

	public void updateUser(User user) throws Exception;

	public User getUser(String userName, String password) throws Exception;

	public User getUser(String userName) throws Exception;

	public User getUserByEmail(String email) throws Exception;

	public List<User> getListUserByGroupId(Long groupId) throws Exception;

	public List<PrivilegeMapping> getPrivilegeMappingList(Long groupId)
			throws Exception;
}
